package com.gx.service.api;

import com.aliyun.oss.model.BucketInfo;
import com.gx.domain.oss.*;

public interface OssService {
    /**
     * 申请临时授权
     */
    BaseResponse<AuthOssStsResponse> authOssSts(CommonParam commonParam, AuthOssStsRequest authOssStsRequest);

    /**
     * 创建空间
     */
    BaseResponse<BucketInfo> addBucket(CommonParam commonParam, AuthOssStsRequest authOssStsRequest);

    /**
     * 删除空间
     */
    BaseResponse<String> delBucket(CommonParam commonParam, AuthOssStsRequest authOssStsRequest);

    /**
     * 获取空间列表
     */
    BaseResponse<GetBucketByListResponse> getBucketByList(CommonParam commonParam, AuthOssStsRequest authOssStsRequest);

    /**
     * 文件上传
     */
    BaseResponse<String> putFile(CommonParam commonParam, PutFileRequest putFileRequest);

    /**
     * 下载文件
     */
    BaseResponse<AuthOssStsResponse> newOssUrl(CommonParam commonParam, PutFileRequest putFileRequest);

    /**
     * 设置防盗链
     */
    BaseResponse<String> setBucketReferer(CommonParam commonParam, RefererRequest refererRequest);

    /**
     * 查看防盗链列表
     */
    BaseResponse<RefererResPonse> getBucketReferer(CommonParam commonParam, RefererRequest refererRequest);

    /**
     * 清除防盗链列表
     */
    BaseResponse<String> delBucketReferer(CommonParam commonParam, RefererRequest refererRequest);

    /**
     * 带回调上传
     */
    BaseResponse putFileCallBack(CommonParam commonParam, PutFileRequest request);
}
